Fix building with current rustc
authorBjörn Steinbrink <bsteinbr@gmail.com>
Tue, 23 Sep 2014 18:27:48 +0000 (20:27 +0200)
committerBjörn Steinbrink <bsteinbr@gmail.com>
Tue, 23 Sep 2014 18:27:48 +0000 (20:27 +0200)
Cargo.lock
src/cargo/lib.rs
src/cargo/util/config.rs

index c37129fc325fa093c7808a432fde72eaf0af0caf..fe699510ac7ef5d0ed801b28cf902e5414843a8a 100644 (file)
@@ -3,16 +3,16 @@ name = "cargo"
 version = "0.0.1-pre"
 dependencies = [
  "curl 0.0.1 (git+https://github.com/alexcrichton/curl-rust?ref=bundle#720d87fa32c738c397252cf3c26d428bdca697d4)",
- "docopt 0.6.3 (git+https://github.com/docopt/docopt.rs#ca5a09aba10c5040220efe9d237a430f3b924736)",
- "docopt_macros 0.6.3 (git+https://github.com/docopt/docopt.rs#ca5a09aba10c5040220efe9d237a430f3b924736)",
- "flate2 0.0.1 (git+https://github.com/alexcrichton/flate2-rs#a59b2a103642550bc1500c302c5031479ec7d9e1)",
- "git2 0.0.1 (git+https://github.com/alexcrichton/git2-rs#08dc5e62bf11ff8957fcb98c0c3c57c764fc4879)",
- "glob 0.0.1 (git+https://github.com/rust-lang/glob#ce24c37f268c4a31238dbe3b8e9ff8fe5342f0be)",
+ "docopt 0.6.3 (git+https://github.com/docopt/docopt.rs#4e41cda2ec64766884929abbddebdb4d874f1d02)",
+ "docopt_macros 0.6.3 (git+https://github.com/docopt/docopt.rs#4e41cda2ec64766884929abbddebdb4d874f1d02)",
+ "flate2 0.0.1 (git+https://github.com/alexcrichton/flate2-rs#2730aeaa87c04bef814d1c1fd5ba7bed7cbc5a4d)",
+ "git2 0.0.1 (git+https://github.com/alexcrichton/git2-rs#96b9500c0e5d37efff13749fc01837b15dc5ac72)",
+ "glob 0.0.1 (git+https://github.com/rust-lang/glob#2bcf0fcf0d19705cce3cb89fa8930397feea782d)",
  "hamcrest 0.1.0 (git+https://github.com/carllerche/hamcrest-rust.git#49061a2134d9112b8622d54587590f324b97cc98)",
  "semver 0.1.0 (git+https://github.com/rust-lang/semver#c88a711f543c57368be347686a549aa4254ec48f)",
- "tar 0.0.1 (git+https://github.com/alexcrichton/tar-rs#b2391703d54afd20c999d5531c4ed46bcf366f23)",
- "toml 0.1.0 (git+https://github.com/alexcrichton/toml-rs#22ad6e7ea9f2a81aac3ba9e427dd8a1036453486)",
- "url 0.1.0 (git+https://github.com/servo/rust-url#275c4a8e1926ab87247203817c9c812e9b83a49f)",
+ "tar 0.0.1 (git+https://github.com/alexcrichton/tar-rs#ff855f27be0394bac944d62914683c0d00ba0fa3)",
+ "toml 0.1.0 (git+https://github.com/alexcrichton/toml-rs#8cdb2747de86ea7de6491ce5ba5dc522421bed7f)",
+ "url 0.1.0 (git+https://github.com/servo/rust-url#29f70a47230c2aa736e263977247c786e0b2c243)",
 ]
 
 [[package]]
@@ -22,7 +22,7 @@ source = "git+https://github.com/alexcrichton/curl-rust?ref=bundle#720d87fa32c73
 dependencies = [
  "curl-sys 0.0.1 (git+https://github.com/alexcrichton/curl-rust?ref=bundle#720d87fa32c738c397252cf3c26d428bdca697d4)",
  "link-config 0.0.1 (git+https://github.com/alexcrichton/link-config#1d3cd271612036b47c015a55f33a97e1524569ae)",
- "url 0.1.0 (git+https://github.com/servo/rust-url#275c4a8e1926ab87247203817c9c812e9b83a49f)",
+ "url 0.1.0 (git+https://github.com/servo/rust-url#29f70a47230c2aa736e263977247c786e0b2c243)",
 ]
 
 [[package]]
@@ -33,14 +33,14 @@ source = "git+https://github.com/alexcrichton/curl-rust?ref=bundle#720d87fa32c73
 [[package]]
 name = "docopt"
 version = "0.6.3"
-source = "git+https://github.com/docopt/docopt.rs#ca5a09aba10c5040220efe9d237a430f3b924736"
+source = "git+https://github.com/docopt/docopt.rs#4e41cda2ec64766884929abbddebdb4d874f1d02"
 
 [[package]]
 name = "docopt_macros"
 version = "0.6.3"
-source = "git+https://github.com/docopt/docopt.rs#ca5a09aba10c5040220efe9d237a430f3b924736"
+source = "git+https://github.com/docopt/docopt.rs#4e41cda2ec64766884929abbddebdb4d874f1d02"
 dependencies = [
- "docopt 0.6.3 (git+https://github.com/docopt/docopt.rs#ca5a09aba10c5040220efe9d237a430f3b924736)",
+ "docopt 0.6.3 (git+https://github.com/docopt/docopt.rs#4e41cda2ec64766884929abbddebdb4d874f1d02)",
 ]
 
 [[package]]
@@ -51,21 +51,21 @@ source = "git+https://github.com/lifthrasiir/rust-encoding#28eafb604a92c7786685b
 [[package]]
 name = "flate2"
 version = "0.0.1"
-source = "git+https://github.com/alexcrichton/flate2-rs#a59b2a103642550bc1500c302c5031479ec7d9e1"
+source = "git+https://github.com/alexcrichton/flate2-rs#2730aeaa87c04bef814d1c1fd5ba7bed7cbc5a4d"
 
 [[package]]
 name = "git2"
 version = "0.0.1"
-source = "git+https://github.com/alexcrichton/git2-rs#08dc5e62bf11ff8957fcb98c0c3c57c764fc4879"
+source = "git+https://github.com/alexcrichton/git2-rs#96b9500c0e5d37efff13749fc01837b15dc5ac72"
 dependencies = [
- "libgit2 0.0.1 (git+https://github.com/alexcrichton/git2-rs#08dc5e62bf11ff8957fcb98c0c3c57c764fc4879)",
- "url 0.1.0 (git+https://github.com/servo/rust-url#275c4a8e1926ab87247203817c9c812e9b83a49f)",
+ "libgit2 0.0.1 (git+https://github.com/alexcrichton/git2-rs#96b9500c0e5d37efff13749fc01837b15dc5ac72)",
+ "url 0.1.0 (git+https://github.com/servo/rust-url#29f70a47230c2aa736e263977247c786e0b2c243)",
 ]
 
 [[package]]
 name = "glob"
 version = "0.0.1"
-source = "git+https://github.com/rust-lang/glob#ce24c37f268c4a31238dbe3b8e9ff8fe5342f0be"
+source = "git+https://github.com/rust-lang/glob#2bcf0fcf0d19705cce3cb89fa8930397feea782d"
 
 [[package]]
 name = "hamcrest"
@@ -75,7 +75,7 @@ source = "git+https://github.com/carllerche/hamcrest-rust.git#49061a2134d9112b86
 [[package]]
 name = "libgit2"
 version = "0.0.1"
-source = "git+https://github.com/alexcrichton/git2-rs#08dc5e62bf11ff8957fcb98c0c3c57c764fc4879"
+source = "git+https://github.com/alexcrichton/git2-rs#96b9500c0e5d37efff13749fc01837b15dc5ac72"
 dependencies = [
  "libssh2-static-sys 0.0.1 (git+https://github.com/alexcrichton/libssh2-static-sys#6a5d3ad7b62db6ca0721c528402f4976a1876036)",
  "link-config 0.0.1 (git+https://github.com/alexcrichton/link-config#1d3cd271612036b47c015a55f33a97e1524569ae)",
@@ -105,17 +105,17 @@ source = "git+https://github.com/rust-lang/semver#c88a711f543c57368be347686a549a
 [[package]]
 name = "tar"
 version = "0.0.1"
-source = "git+https://github.com/alexcrichton/tar-rs#b2391703d54afd20c999d5531c4ed46bcf366f23"
+source = "git+https://github.com/alexcrichton/tar-rs#ff855f27be0394bac944d62914683c0d00ba0fa3"
 
 [[package]]
 name = "toml"
 version = "0.1.0"
-source = "git+https://github.com/alexcrichton/toml-rs#22ad6e7ea9f2a81aac3ba9e427dd8a1036453486"
+source = "git+https://github.com/alexcrichton/toml-rs#8cdb2747de86ea7de6491ce5ba5dc522421bed7f"
 
 [[package]]
 name = "url"
 version = "0.1.0"
-source = "git+https://github.com/servo/rust-url#275c4a8e1926ab87247203817c9c812e9b83a49f"
+source = "git+https://github.com/servo/rust-url#29f70a47230c2aa736e263977247c786e0b2c243"
 dependencies = [
  "encoding 0.1.0 (git+https://github.com/lifthrasiir/rust-encoding#28eafb604a92c7786685b46c0fc02682ba3ab265)",
 ]
index 99a15bb0b4292d8cf98a22106d89bcd5ce272207..f3fa578a742588891e8bbcb577084fefc6f10446 100644 (file)
@@ -77,7 +77,7 @@ pub mod ops;
 pub mod sources;
 pub mod util;
 
-trait RepresentsJSON : Decodable<json::Decoder, json::DecoderError> {}
+pub trait RepresentsJSON : Decodable<json::Decoder, json::DecoderError> {}
 impl<T: Decodable<json::Decoder, json::DecoderError>> RepresentsJSON for T {}
 
 pub fn execute_main<'a,
index 6c2918ade109672f76c36b6e9bcf4136d7548a99..0d21145a226554b1d1411a539ea2b359338bb5e0 100644 (file)
@@ -1,4 +1,4 @@
-use std::{fmt, os, result, mem};
+use std::{fmt, os, mem};
 use std::io::fs::{PathExtensions, File};
 use std::collections::HashMap;
 use std::string;
@@ -139,18 +139,18 @@ impl ConfigValue {
             toml::String(val) => Ok(String(val, path.clone())),
             toml::Boolean(b) => Ok(Boolean(b, path.clone())),
             toml::Array(val) => {
-                Ok(List(try!(result::collect(val.move_iter().map(|toml| {
+                Ok(List(try!(val.into_iter().map(|toml| {
                     match toml {
                         toml::String(val) => Ok((val, path.clone())),
                         _ => Err(internal("")),
                     }
-                })))))
+                }).collect::<Result<_, _>>())))
             }
             toml::Table(val) => {
-                Ok(Table(try!(result::collect(val.move_iter().map(|(key, value)| {
+                Ok(Table(try!(val.into_iter().map(|(key, value)| {
                     let value = raw_try!(ConfigValue::from_toml(path, value));
                     Ok((key, value))
-                })))))
+                }).collect::<Result<_, _>>())))
             }
             _ => return Err(internal(""))
         }